home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 2 / Apprentice-Release2.iso / Source Code / Pascal / Games / Pararena 1.3 / source / Parts ƒ / TheMenus.p < prev    next >
Encoding:
Text File  |  1991-05-17  |  14.9 KB  |  620 lines  |  [TEXT/PJMM]

  1. unit TheMenus;
  2.  
  3. interface
  4.  
  5.     uses
  6.         Sound, Globals, Unlock, Dialogs, Utilities, Guts, Initialize;
  7.  
  8.     procedure NewGameVars;
  9.     procedure NewPeriodVars;
  10.     procedure EndOfPeriod;
  11.     procedure Handle_My_Menu (theMenu, theItem: integer); {Handle menu selection}
  12.  
  13. implementation
  14.  
  15. {=================================}
  16.  
  17.     procedure NewGameVars;
  18.         var
  19.             index: Integer;
  20.             dummyLong: LongInt;
  21.             theSnd: Handle;
  22.             signSrcL, signSrcR, signMaskL, signMaskR, signDestL, signDestR, tempRect: Rect;
  23.  
  24.     begin
  25.         DisableItem(GetMenu(mGame), iBegin);
  26.         EnableItem(GetMenu(mGame), iEnd);
  27.         DisableItem(GetMenu(mGame), iWhichGame);
  28.         DisableItem(GetMenu(mGame), iWhichOpponent);
  29.         DisableItem(GetMenu(mOptions), iPhysics);
  30.         HideMenuBar;
  31.  
  32.         SetUpMouseForce;
  33.  
  34.         SetPort(mainWndo);
  35.         tempRect := ScreenBits.bounds;
  36.         if (tempRect.bottom > 342) then
  37.             begin
  38.                 tempRect.bottom := tempRect.top + 20;
  39.                 OffsetRect(tempRect, -rightOffset, -downOffset);
  40.                 ClipRect(tempRect);
  41.                 FillRect(tempRect, black);
  42.                 SetClip(wholeRgn);
  43.             end;
  44.         CopyBits(offVirginMap, mainWndo^.portBits, wholeScreen, wholeScreen, srcCopy, wholeRgn);
  45.  
  46.         tileLit := tileLit + 1;
  47.         if (tileLit < 6) then
  48.             repeat
  49.                 SetPort(mainWndo);
  50.                 InvertRgn(tileRgns[tileLit, tileToggle]);
  51.                 SetPort(offVirginPort);
  52.                 InvertRgn(tileRgns[tileLit, tileToggle]);
  53.                 tileLit := tileLit + 1;
  54.             until (tileLit > 5);
  55.         tileLit := -1;
  56.         if (not cursorVis) then
  57.             HideCursor;
  58.  
  59.         SetRect(signSrcL, 1, 266, 70, 321);
  60.         SetRect(signMaskL, 71, 266, 140, 321);
  61.         SetRect(signDestL, 70, 0, 139, 55);
  62.         SetRect(signSrcR, 141, 266, 210, 321);
  63.         SetRect(signMaskR, 211, 266, 280, 321);
  64.         SetRect(signDestR, 370, 0, 439, 55);
  65.         for index := 1 to 3 do
  66.             begin
  67.                 CopyMask(offEnemyMap, offEnemyMap, mainWndo^.portBits, signSrcL, signMaskL, signDestL);
  68.                 CopyMask(offEnemyMap, offEnemyMap, mainWndo^.portBits, signSrcR, signMaskR, signDestR);
  69.                 Delay(5, dummyLong);
  70.                 CopyMask(offEnemyMap, offEnemyMap, mainWndo^.portBits, signMaskL, signMaskL, signDestL);
  71.                 CopyMask(offEnemyMap, offEnemyMap, mainWndo^.portBits, signMaskR, signMaskR, signDestR);
  72.             end;
  73.         CopyMask(offEnemyMap, offEnemyMap, mainWndo^.portBits, signSrcL, signMaskL, signDestL);
  74.         CopyMask(offEnemyMap, offEnemyMap, mainWndo^.portBits, signSrcR, signMaskR, signDestR);
  75.  
  76.         playing := TRUE;
  77.         pausing := FALSE;
  78.         justQuit := FALSE;
  79.         whichPeriod := 1;
  80.         earthPoints := 0;
  81.         taygetePoints := 0;
  82.  
  83.         FlushEvents(everyEvent, 0);
  84.  
  85.         numerator := massNumbers[whichOpponent, 0];
  86.         denominator := massNumbers[whichOpponent, 1];
  87.  
  88.         case frictState of
  89.             noFriction: 
  90.                 begin
  91.                     frictNum := 1;
  92.                     frictDen := 1;
  93.                 end;
  94.             weakFriction: 
  95.                 begin
  96.                     frictNum := 79;
  97.                     frictDen := 80;
  98.                 end;
  99.             normalFriction: 
  100.                 begin
  101.                     frictNum := 39;
  102.                     frictDen := 40;
  103.                 end;
  104.             strongFriction: 
  105.                 begin
  106.                     frictNum := 19;
  107.                     frictDen := 20;
  108.                 end;
  109.             otherwise
  110.                 begin
  111.                 end;
  112.         end;
  113.  
  114.         ResetTitleVars;
  115.         Delay(30, dummyLong);
  116.         CopyBits(offVirginMap, mainWndo^.portBits, wholeScreen, wholeScreen, srcCopy, wholeRgn);
  117.     end;
  118.  
  119. {=================================}
  120.  
  121.     procedure NewPeriodVars;
  122.  
  123.         procedure DisplayPeriod;
  124.             var
  125.                 index: Integer;
  126.         begin
  127.             for index := 1 to whichPeriod do
  128.                 begin
  129.                     CopyBits(offPlayerMap, mainWndo^.portBits, foulSrc, periodDest[index], srcCopy, nil);
  130.                 end;
  131.         end;
  132.  
  133.         procedure FireUpScoreBoards;
  134.             var
  135.                 index: Integer;
  136.                 dummyLong: LongInt;
  137.         begin
  138.             for index := 1 to 18 do
  139.                 begin
  140.                     CopyBits(offPlayerMap, mainWndo^.portBits, digitSrc[DoRandom(17)], earthScoreDest[1], srcCopy, nil);
  141.                     CopyBits(offPlayerMap, mainWndo^.portBits, digitSrc[DoRandom(17)], earthScoreDest[2], srcCopy, nil);
  142.                     CopyBits(offPlayerMap, mainWndo^.portBits, digitSrc[DoRandom(17)], earthScoreDest[3], srcCopy, nil);
  143.                     Delay(2, dummyLong);
  144.                 end;
  145.             CopyBits(offPlayerMap, mainWndo^.portBits, digitSrc[12], earthScoreDest[1], srcCopy, nil);
  146.             CopyBits(offPlayerMap, mainWndo^.portBits, digitSrc[12], earthScoreDest[2], srcCopy, nil);
  147.             CopyBits(offPlayerMap, mainWndo^.portBits, digitSrc[12], earthScoreDest[3], srcCopy, nil);
  148.             for index := 1 to 18 do
  149.                 begin
  150.                     CopyBits(offPlayerMap, mainWndo^.portBits, digitSrc[DoRandom(17)], taygeteScoreDest[1], srcCopy, nil);
  151.                     CopyBits(offPlayerMap, mainWndo^.portBits, digitSrc[DoRandom(17)], taygeteScoreDest[2], srcCopy, nil);
  152.                     CopyBits(offPlayerMap, mainWndo^.portBits, digitSrc[DoRandom(17)], taygeteScoreDest[3], srcCopy, nil);
  153.                     Delay(2, dummyLong);
  154.                 end;
  155.         end;
  156.  
  157.         procedure FireUpClock;
  158.             var
  159.                 index: Integer;
  160.                 dummyLong: LongInt;
  161.         begin
  162.             for index := 1 to 4 do
  163.                 begin
  164.                     CopyBits(offPlayerMap, mainWndo^.portBits, digitSrc[12], timeDest[1], srcCopy, nil);
  165.                     CopyBits(offPlayerMap, mainWndo^.portBits, digitSrc[12], timeDest[2], srcCopy, nil);
  166.                     CopyBits(offPlayerMap, mainWndo^.portBits, digitSrc[12], timeDest[3], srcCopy, nil);
  167.                     Delay(10, dummyLong);
  168.                     CopyBits(offPlayerMap, mainWndo^.portBits, digitSrc[11], timeDest[1], srcCopy, nil);
  169.                     CopyBits(offPlayerMap, mainWndo^.portBits, digitSrc[11], timeDest[2], srcCopy, nil);
  170.                     CopyBits(offPlayerMap, mainWndo^.portBits, digitSrc[11], timeDest[3], srcCopy, nil);
  171.                     Delay(15, dummyLong);
  172.                 end;
  173.             CopyBits(offPlayerMap, offVirginMap, digitSrc[5], timeDest[1], srcCopy, nil);
  174.             CopyBits(offPlayerMap, offVirginMap, digitSrc[0], timeDest[2], srcCopy, nil);
  175.             CopyBits(offPlayerMap, offVirginMap, digitSrc[0], timeDest[3], srcCopy, nil);
  176.         end;
  177.  
  178.         procedure DoAnnouncer;
  179.             var
  180.                 drag, scan: Integer;
  181.                 dummyLong: LongInt;
  182.                 scanSrc, scanMask, scanSrc2, scanMask2, scanDest, wholeRct: Rect;
  183.  
  184. {----------------}
  185.  
  186.             procedure MouthOpen;
  187.             begin
  188.                 CopyBits(offVirginMap, offLoadMap, scanDest, scanDest, srcCopy, nil);
  189.                 CopyMask(offPlayerMap, offPlayerMap, offLoadMap, scanSrc, scanMask, scanDest);
  190.                 CopyBits(offLoadMap, mainWndo^.portBits, scanDest, scanDest, srcCopy, nil);
  191.             end;
  192.  
  193. {----------------}
  194.  
  195.             procedure MouthShut;
  196.             begin
  197.                 CopyBits(offVirginMap, offLoadMap, scanDest, scanDest, srcCopy, nil);
  198.                 CopyMask(offPlayerMap, offPlayerMap, offLoadMap, scanSrc2, scanMask2, scanDest);
  199.                 CopyBits(offLoadMap, mainWndo^.portBits, scanDest, scanDest, srcCopy, nil);
  200.             end;
  201.  
  202. {----------------}
  203.  
  204.         begin
  205.             DoTheSound('beamIn', highPriority);
  206.             for drag := 2 to 12 do
  207.                 begin
  208.                     for scan := 0 to 47 - drag do
  209.                         begin
  210.                             SetRect(scanSrc, 331, 145 + scan, 363, 145 + drag + scan);
  211.                             SetRect(scanMask, 331, 193 + scan, 363, 193 + drag + scan);
  212.                             SetRect(scanDest, 240, 193 + scan, 272, 193 + drag + scan);
  213.                             wholeRct := scanDest;
  214.                             wholeRct.top := wholeRct.top - 1;
  215.                             CopyBits(offVirginMap, offLoadMap, wholeRct, wholeRct, srcCopy, nil);
  216.                             CopyMask(offPlayerMap, offPlayerMap, offLoadMap, scanSrc, scanMask, scanDest);
  217.                             CopyBits(offLoadMap, mainWndo^.portBits, wholeRct, wholeRct, srcCopy, nil);
  218.                         end;
  219.                     CopyBits(offVirginMap, mainWndo^.portBits, wholeRct, wholeRct, srcCopy, nil);
  220.                 end;
  221.             for scan := 0 to 46 do
  222.                 begin
  223.                     SetRect(scanSrc, 331, 145 + scan, 363, 146 + scan);
  224.                     SetRect(scanMask, 331, 193 + scan, 363, 194 + scan);
  225.                     SetRect(scanDest, 240, 193 + scan, 272, 194 + scan);
  226.                     CopyBits(offVirginMap, offLoadMap, scanDest, scanDest, srcCopy, nil);
  227.                     CopyMask(offPlayerMap, offPlayerMap, offLoadMap, scanSrc, scanMask, scanDest);
  228.                     CopyBits(offLoadMap, mainWndo^.portBits, scanDest, scanDest, srcCopy, nil);
  229.                 end;
  230.             DoTheSound('pararena', highPriority);
  231.             SetRect(scanSrc, 331, 145, 363, 192);
  232.             SetRect(scanMask, 331, 193, 363, 240);
  233.             SetRect(scanSrc2, 364, 145, 396, 192);
  234.             SetRect(scanMask2, 364, 193, 396, 240);
  235.             SetRect(scanDest, 240, 193, 272, 240);
  236.  
  237.             MouthOpen;    {"Ladies-"}
  238.             Delay(7, dummyLong);
  239.             MouthShut;    {"-"}
  240.             Delay(2, dummyLong);
  241.  
  242.             MouthOpen;    {" and "}
  243.             Delay(5, dummyLong);
  244.             MouthShut;    {"-"}
  245.             Delay(2, dummyLong);
  246.  
  247.             MouthOpen;    {" Gent- "}
  248.             Delay(9, dummyLong);
  249.             MouthShut;    {"-le-"}
  250.             Delay(2, dummyLong);
  251.             MouthOpen;    {"-men "}
  252.             Delay(11, dummyLong);
  253.             MouthShut;    {"-"}
  254.             Delay(20, dummyLong);
  255.  
  256.             MouthOpen;    {"Par-"}
  257.             Delay(30, dummyLong);
  258.             MouthShut;
  259.             Delay(5, dummyLong);
  260.             MouthOpen;    {"-a-"}
  261.             Delay(25, dummyLong);
  262.             MouthShut;
  263.             Delay(5, dummyLong);
  264.             MouthOpen;    {"rena!!!!"}
  265.             Delay(90, dummyLong);
  266.             for scan := 0 to 46 do
  267.                 begin
  268.                     SetRect(scanDest, 240, 193 + scan, 272, 194 + scan);
  269.                     CopyBits(offVirginMap, offLoadMap, scanDest, scanDest, srcCopy, nil);
  270.                     CopyBits(offVirginMap, mainWndo^.portBits, scanDest, scanDest, srcCopy, nil);
  271.                 end;
  272.         end;
  273.  
  274. {----------------}
  275.  
  276.         procedure SoloStartUp;
  277.             var
  278.                 index: Integer;
  279.         begin
  280.             periodTime := 0;
  281.             DrawEarthScore;
  282.             DrawTaygeteScore;
  283.             DisplayTime(periodTime);
  284.             DisplayPeriod;
  285.  
  286.             with opponent do
  287.                 begin
  288.                     velX := 0;
  289.                     velZ := 0;
  290.                     posX := 52000;
  291.                     posZ := 52000;
  292.                 end;
  293.  
  294.             if (soundArray[4]) then
  295.                 DoTheSound('beamIn', highPriority);
  296.             for index := 0 to 23 do
  297.                 BeamInPlayer(TRUE, player);
  298.             startTime := TickCount div 60;
  299.         end;
  300.  
  301. {----------------}
  302.  
  303.         procedure DualStartUp;
  304.             var
  305.                 index: Integer;
  306.         begin
  307.             if (whichPeriod = 1) then
  308.                 DoAnnouncer;
  309.             if (soundArray[1]) then
  310.                 DoTheSound('crowd', highPriority);
  311.             FireUpScoreBoards;
  312.             DrawEarthScore;
  313.             DrawTaygeteScore;
  314.             FireUpClock;
  315.             DisplayTime(periodTime);
  316.             DisplayPeriod;
  317.             if (soundArray[4]) then
  318.                 DoTheSound('beamIn', highPriority);
  319.             for index := 0 to 23 do
  320.                 BeamInPlayer(FALSE, opponent);
  321.             if (soundArray[4]) then
  322.                 DoTheSound('beamIn', highPriority);
  323.             for index := 0 to 23 do
  324.                 BeamInPlayer(TRUE, player);
  325.             DrawPlayerOpponent;
  326.             bothJustHit := FALSE;
  327.             startTime := TickCount div 60;
  328.             FireBall;
  329.         end;
  330.  
  331. {----------------}
  332.  
  333.     begin
  334.         earthFouls := 0;
  335.         taygeteFouls := 0;
  336.         DrawFouls(earthFouls, 0);
  337.         DrawFouls(taygeteFouls, 1);
  338.  
  339.         with ball do
  340.             begin
  341.                 SetRect(oldDest, 0, 0, 0, 0);
  342.                 SetRect(dest, 0, 0, 0, 0);
  343.             end;
  344.  
  345.         with opponent do
  346.             begin
  347.                 velX := 0;
  348.                 velZ := 0;
  349.                 posX := 2000;
  350.                 posZ := 0;
  351.                 mode := -1;
  352.                 timeKeeper := 0;
  353.                 carryMode := notCarrying;
  354.                 screenH := centerH + posX div 100;
  355.                 HLock(Handle(vertTable));
  356.                 screenV := vertTable^^.data[ABS(posX div 300), posZ div 300] + 20;
  357.                 HUnlock(Handle(vertTable));
  358.                 SetRect(dest, screenH - 13, screenV - 45, screenH + 14, screenV);
  359.                 oldDest := dest;
  360.             end;
  361.  
  362.         with player do
  363.             begin
  364.                 velX := 0;
  365.                 velZ := 0;
  366.                 posX := -2000;
  367.                 posZ := 0;
  368.                 mode := -1;
  369.                 timeKeeper := 0;
  370.                 carryMode := notCarrying;
  371.                 screenH := centerH + posX div 100;
  372.                 HLock(Handle(vertTable));
  373.                 screenV := vertTable^^.data[ABS(posX div 300), posZ div 300] + 20;
  374.                 HUnlock(Handle(vertTable));
  375.                 SetRect(dest, screenH - 13, screenV - 45, screenH + 14, screenV);
  376.                 oldDest := dest;
  377.             end;
  378.  
  379.         case whichGame of
  380.             practiceSkating: 
  381.                 begin
  382.                     SoloStartUp;
  383.                     DrawPlayer;
  384.                 end;
  385.             practiceWBall: 
  386.                 begin
  387.                     SoloStartUp;
  388.                     DrawPlayer;
  389.                     FireBall;
  390.                 end;
  391.             fourOfFive: 
  392.                 begin
  393.                     periodTime := 300;
  394.                     DualStartUp;
  395.                 end;
  396.             fourOfNine: 
  397.                 begin
  398.                     periodTime := 540;
  399.                     DualStartUp;
  400.                 end;
  401.             firstToThirteen: 
  402.                 begin
  403.                     periodTime := 0;
  404.                     DualStartUp;
  405.                 end;
  406.             deltaFive: 
  407.                 begin
  408.                     periodTime := 0;
  409.                     DualStartUp;
  410.                 end;
  411.             otherwise
  412.                 begin
  413.                 end;
  414.         end;
  415.  
  416.         mad := FALSE;
  417.  
  418.         FlushEvents(everyEvent, 0);
  419.         lastLoopTime := TickCount + delayTime;
  420.     end;
  421.  
  422. {=================================}
  423.  
  424.     procedure DoEnd;
  425.     begin
  426.         InitCursor;
  427.         EnableItem(GetMenu(mGame), iBegin);
  428.         DisableItem(GetMenu(mGame), iEnd);
  429.         EnableItem(GetMenu(mGame), iWhichGame);
  430.         EnableItem(GetMenu(mGame), iWhichOpponent);
  431.         if (not locked) then
  432.             EnableItem(GetMenu(mOptions), iPhysics);
  433.         CopyBits(offVirginMap, mainWndo^.portBits, screenArea, screenArea, srcCopy, nil);
  434.         ShowMenuBar;
  435.         DrawMenuBar;
  436.         FlushEvents(everyEvent, 0);
  437.         justQuit := TRUE;
  438.         playing := FALSE;
  439.         pausing := FALSE;
  440.     end;
  441.  
  442. {=================================}
  443.  
  444.     procedure EndOfPeriod;
  445.         var
  446.             index: Integer;
  447.     begin
  448.         whichPeriod := whichPeriod + 1;
  449.         OpponentOutOfArena;
  450.         PlayerOutOfArena;
  451.         for index := 1 to 22 do
  452.             begin
  453.                 OpponentInTransit;
  454.                 PlayerInTransit;
  455.             end;
  456.         opponent.timeKeeper := 0;
  457.         player.timeKeeper := 0;
  458.         CopyBits(offVirginMap, mainWndo^.portBits, ball.oldDest, ball.oldDest, srcCopy, wholeRgn);
  459.         CopyBits(offVirginMap, mainWndo^.portBits, ball.dest, ball.dest, srcCopy, wholeRgn);
  460.  
  461.         case whichGame of
  462.             fourOfFive, fourOfNine: 
  463.                 begin
  464.                     if (whichPeriod > 4) then
  465.                         begin
  466.                             DoGameOver;
  467.                         end
  468.                     else
  469.                         begin
  470.                             NewPeriodVars;
  471.                         end;
  472.                 end;
  473.             firstToThirteen, deltaFive: 
  474.                 DoGameOver;
  475.             otherwise
  476.         end;
  477.     end;
  478.  
  479. {=================================}
  480.  
  481.     procedure Handle_My_Menu;               {Handle menu selections realtime}
  482.         var
  483.             DNA: integer;
  484.             BoolHolder: boolean;
  485.             DAName: Str255;
  486.             SavePort: GrafPtr;
  487.  
  488. {-----------------}
  489.  
  490.         procedure DoApple;
  491.         begin
  492.             case theItem of
  493.                 iNothing: 
  494.                     ;
  495.                 iAbout: 
  496.                     begin
  497.                         CopyBits(mainWndo^.portBits, offLoadMap, wholeScreen, wholeScreen, srcCopy, wholeRgn);
  498.                         if ShowAboutDialog then
  499.                             DoUnlock;
  500.                         CopyBits(offLoadMap, mainWndo^.portBits, wholeScreen, wholeScreen, srcCopy, wholeRgn);
  501.                     end;
  502.                 otherwise
  503.                     begin
  504.                         GetPort(SavePort);
  505.                         GetItem(GetMenu(mApple), theItem, DAName);
  506.                         DNA := OpenDeskAcc(DAName);
  507.                         SetPort(SavePort);
  508.                     end;
  509.             end;
  510.         end;
  511.  
  512. {-----------------}
  513.  
  514.         procedure DoGame;
  515.         begin
  516.             case theItem of                   {Handle all commands in this menu list}
  517.                 iBegin: 
  518.                     begin
  519.                         NewGameVars;
  520.                         NewPeriodVars;
  521.                     end;
  522.                 iEnd: 
  523.                     DoEnd;
  524.                 iQuit: 
  525.                     begin
  526.                         doneFlag := TRUE;
  527.                         playing := FALSE;
  528.                         pausing := FALSE;
  529.                         InitCursor;
  530.                     end;
  531.                 otherwise
  532.             end;
  533.         end;
  534.  
  535. {-----------------}
  536.  
  537.         procedure DoWhichGame;
  538.             var
  539.                 index: Integer;
  540.         begin
  541.             for index := iPractice to iDeltaFive do
  542.                 CheckItem(GetMenu(mWhichGame), index, FALSE);
  543.             CheckItem(GetMenu(mWhichGame), theItem, TRUE);
  544.             whichGame := theItem - 1;
  545.         end;
  546.  
  547. {-----------------}
  548.  
  549.         procedure DoOpponents;
  550.             var
  551.                 index: Integer;
  552.         begin
  553.             for index := iMara to iClaire do
  554.                 CheckItem(GetMenu(mOpponents), index, FALSE);
  555.             CheckItem(GetMenu(mOpponents), theItem, TRUE);
  556.             whichOpponent := theItem;
  557.         end;
  558.  
  559. {-----------------}
  560.  
  561.         procedure DoOptions;
  562.             var
  563.                 index: Integer;
  564.         begin
  565.             case theItem of
  566.                 iVisCurs: 
  567.                     begin
  568.                         cursorVis := not cursorVis;
  569.                         CheckItem(GetMenu(mOptions), iVisCurs, cursorVis);
  570.                     end;
  571.                 iAutoPickUp: 
  572.                     begin
  573.                         autoPickUp := not autoPickUp;
  574.                         CheckItem(GetMenu(mOptions), iAutoPickUp, autoPickUp);
  575.                     end;
  576.                 iSound: 
  577.                     DoSound;
  578.                 iSpeed: 
  579.                     DoSpeed;
  580.                 iPhysics: 
  581.                     begin
  582.                         DoPhysics;
  583.                         SetUpMouseForce;
  584.                     end;
  585.                 iHelpRules: 
  586.                     DoHelpRules;
  587.                 iHelpOther: 
  588.                     DoHelpPlay;
  589.  
  590.                 iHiScores: 
  591.                     begin
  592.                         ShowHiScores;
  593.                     end;
  594.                 otherwise
  595.             end;
  596.         end;
  597.  
  598. {-----------------}
  599.  
  600.     begin
  601.         case theMenu of
  602.             mApple: 
  603.                 DoApple;
  604.             mGame: 
  605.                 DoGame;
  606.             mWhichGame: 
  607.                 DoWhichGame;
  608.             mOpponents: 
  609.                 DoOpponents;
  610.             mOptions: 
  611.                 DoOptions;
  612.             otherwise
  613.         end;
  614.  
  615.         HiliteMenu(0);
  616.     end;
  617.  
  618. {=================================}
  619.  
  620. end.                                    {End of unit}